Static Deadlock Detection for Java Libraries

نویسندگان

  • Amy L. Williams
  • William Thies
  • Michael D. Ernst
چکیده

Library writers wish to provide a guarantee not only that each procedure in the library performs correctly in isolation, but also that the procedures perform correctly when run in conjunction. To this end, we propose a method for static detection of deadlock in Java libraries. Our goal is to determine whether client code exists that may deadlock a library, and, if so, to enable the library writer to discover the calling patterns that can lead to deadlock. Our flow-sensitive, context-sensitive analysis determines possible deadlock configurations using a lock-order graph. This graph represents the order in which locks are acquired by the library. Cycles in the graph indicate deadlock possibilities, and our tool reports all such possibilities. We implemented our analysis and evaluated it on 18 libraries comprising 1245 kLOC. We verified 13 libraries to be free from deadlock, and found 14 distinct deadlocks in 3 libraries.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Static Detection of Deadlock for Java Libraries

Library writers wish to provide a guarantee not only that each procedure in the library performs correctly in isolation, but also that the procedures perform correctly when run in conjunction. To this end, we propose a method for static detection of deadlock in Java libraries. Our goal is to determine whether client code exists that may deadlock a library, and, if so, to enable the library writ...

متن کامل

Safe and Verifiable Design of Multithreaded Java Programs with CSP and FDR

Java may used to develop code for life-, safety-, and mission-critical embedded systems; multithreaded applications must be free from deadlock and livelock. These problems can be eliminated by basing designs on the structures and formalisms of Hoare's Communicating Sequential Processes (CSP). Java class libraries supporting CSP constructs now allow programmers to take advantage of these methods...

متن کامل

Static Detection of Atomicity Violations in Object-Oriented Programs

Violations of atomicity are possible sources of errors in parallel programs. A violation occurs if the effect of a method execution depends on the execution of concurrent threads that operate on the same or overlapping parts of a shared data structure. All accesses to shared data are assumed to be ordered through synchronization, hence common techniques for data race and deadlock detection are ...

متن کامل

Short Presentation: Static Verification of Global Heap References in Java Native Libraries

Explicit memory management of Java objects is a frequent source of programming errors in Java native libraries. In this article we present a static verification tool for the automatic detection of frequent kinds of errors such as missing registration of global references. The tool implements a control-flow aware interprocedural escape analysis in order to determine which references have to be e...

متن کامل

Detecting Potential Deadlocks with Static Analysis and Run-Time Monitoring

Concurrent programs are notorious for containing errors that are difficult to reproduce and diagnose. A common kind of concurrency error is deadlock, which occurs when a set of threads is blocked each trying to acquire a lock held by another thread in that set. Static and dynamic (run-time) analysis techniques exist to detect deadlocks. Havelund’s GoodLock algorithm detects potential deadlocks ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005